<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
	<head>
		<title>人员绩效-金融风险管理系统</title>
		<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
		<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
		function jumpPage(page) {
			var searchForm = document.searchForm;
			searchForm.action = "<s:property value='contextPath'/>/pm/userPm/index.do?currentPage=" + page;
			searchForm.submit();
		}
		
		function paymentConfirm(id) {
			if(confirm("确认核发吗?")) {
				var searchForm = document.searchForm;
				searchForm.action = "<s:property value='contextPath'/>/pm/userPm/paymentConfirm.do?currentPage=${currentPage}&entity.id="+id;
				searchForm.submit();
			}
		}
		
		
		function selall(){
			$("input[name='mid\[\]']").attr('checked','checked');
		}
		
		function noselall(){
			$("input[name='mid\[\]']").attr('checked',false);
		}

		function subAll(){
			var id = document.getElementsByName("id");
			if(confirm("确认批量核发吗?")) {
				if(id.length>0){
					var searchForm = document.searchForm;
					searchForm.action = "<s:property value='contextPath'/>/pm/userPm/paymentConfirmAll.do?currentPage=${currentPage}";
					searchForm.submit();
				}else{
					alert("请至少选中一项.");
				}
			}
		}
		function checkAll(obj){
			var id = document.getElementsByName("id");
			for(var i=0;i<id.length;i++){
				id[i].checked=obj.checked;
			}
		}
		</script>
	</head>
	<body>
	<div class="navigation">
	    <span><a href="javascript:window.history.back();"><img src="${contextPath}/images/back_nav_btn.png" /></a>
	    <a href="javascript:window.history.back();">返回</a>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="javascript:window.location.reload();">刷新</a>
	    </span>绩效管理&gt;&gt;人员绩效
    </div>
    <div class="xt_main_right_center">
      <form name="searchForm" id="searchForm" method="post" action="index.do">
      <table width="100%" border="0" cellpadding="0" cellspacing="0"  style="border-color:#CCCCCC;">
	        <tr>
	            <td class="left-td-width-bg">
	   				  <span>工号:</span>
	            </td>
	            <td class="right-td-width-bg-left">
	             <input type="text" name='search.user.jobNumber' value="${search.user.jobNumber}"  class="input" type="text"  size="16" />
	            </td>
	            <td class="left-td-width-bg">
	   				  <span>姓名:</span>
	            </td>
	            <td class="right-td-width-bg-left">
	             <input type="text" name='search.user.realName' value="${search.user.realName}"  class="input" type="text"  size="16" />
	            </td>
	            <td class="left-td-width-bg">
	   				  <span>区域:</span>
	            </td>
	            <td class="right-td-width-bg-left">
	             <input type="text" name='area' value="${area}" type="text" <s:if test="shoper">class="input_readOnly_98" readonly="readonly"</s:if><s:else>class="input" </s:else>  size="16" />
	            </td>	       
	            <td class="left-td-width-bg">
	   				  <span>店铺:</span>
	            </td>
	            <td class="right-td-width-bg-left">
	             <input type="text" name='shopName' value="${shopName}" <s:if test="shoper">class="input_readOnly_98" readonly="readonly"</s:if><s:else>class="input" </s:else> class="input" type="text"  size="16" />
	            </td>
	        </tr>
	        
	        <tr>
	        	<td class="left-td-width-bg">
	   				  <span>绩效月份:</span>
	            </td>
	            <td class="right-td-width-bg-left">
	             <input type="text" name='search.monthDate' value="${search.monthDate}" onFocus="WdatePicker({dateFmt:'yyyy-MM'})" class="Wdate" type="text" id="monthDateField" size="16" readonly="readonly"/>
	            </td>
	            <td class="left-td-width-bg">
	   				  <span>职务:</span>
	            </td>
	            <td class="right-td-width-bg-left">
<s:select list="{@com.jysz.certificate.persistence.enums.PostType@Shop, @com.jysz.certificate.persistence.enums.PostType@Manager}" listKey="index" listValue="name" 
headerKey="-1" headerValue="***请选择***" theme="simple" name="search.user.post" value="search.user.post.index" cssClass="input"/>	            
	            </td>
	            <td class="left-td-width-bg">
	   				  <span>状态:</span>
	            </td>
	            <td class="right-td-width-bg-left">
	             <input type="text" name='search.status' value="${search.status}"  class="input" type="text"  size="16" />
	            </td>	 
	            <td>&nbsp;</td>           
	            <td>&nbsp;</td>
	        </tr>
		     <tr style="background:url(${contextPath}/images/xt_main_right_dhbj.jpg) repeat-x;">
			    <td height="28" colspan="8" align="right" style="border-bottom:none;">
			    	<input type="button" class="btn_clear_form" onclick="clearForm(this.form);return false;"/>
			    	<input name="" type="submit" name="submit" value=""  class="btn_query"/>
			    </td>
		    </tr>
	      </table>
      </form>
      </div>
      
      <br/>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
		    <td height="25" align="left"><font color="#0066CC"><strong>查询结果：</strong></font></td>
		    <td height="25" align="right">
		    <jysz:permission code="PM_PAYMENT_CONFIRM">
		    	<a href="javascript:subAll()"><img src="${contextPath}/images/all.png" width="74" height="20" border="0" /></a>
		    	</jysz:permission>
            </td>
		  </tr>
		</table>
		      
        <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
		  <tr>
		  			<td width="3%" class="top-td-width-bg"><label><input type="checkbox" onclick="checkAll(this)"/>全选/全不选</label> </td>
    		        <td width="3%" class="top-td-width-bg">序号</td>
    		        <td width="8%" class="top-td-width-bg">工号/姓名</td>
    		        <td width="15%" class="top-td-width-bg">4S店</td>
				    <td width="15%" class="top-td-width-bg">区域</td>
				    <td width="8%" class="top-td-width-bg">职务</td>
				    <td width="8%" class="top-td-width-bg">绩效金额</td>
				    <td width="8%" class="top-td-width-bg">绩效月份</td>
				    <td width="5%" class="top-td-width-bg">状态</td>
			        <td width="5%" class="top-td-width-bg">操作</td>
		  </tr>
		  
 <s:iterator value="page.result" status="s" var="upIterator">
	<tr> 
	  <td class="down-center-td-width-bg">
	  	<s:if test="user != null">
		  	<s:if test="status != null && @com.jysz.certificate.persistence.enums.PerformanceAssignStatus@PM_CONFIRM.equals(status)">
		  		 <jysz:permission code="PM_PAYMENT_CONFIRM">
		 			<input type="checkbox" name="id" value="<s:property value='id'/>"/>
		 		</jysz:permission>
		 	</s:if>
	 	</s:if>
	  </td>
	  <td class="down-center-td-width-bg">${s.index+1}</td>
	  <td class="down-left-td-width-bg">
	  <s:property value="user.jobNumber" />/<s:property value="user.realName" />
	  </td>
	  <td align="left" class="down-left-td-width-bg">
	  	<s:property value="getNotReShopNames(#upIterator)"/>
	  </td> 
	  <td class="down-center-td-width-bg">
	  	<s:property value="getNotReAreaNames(#upIterator)"/>	
	  </td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="user.post.name"/>
	  </td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="formatAmount(amount)"/>
	  </td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="monthDate"/>
	  </td>
	  <td class="down-center-td-width-bg">
		<s:property value="status"/>
	 </td>
	  <td class="down-center-td-width-bg">
	  	<s:if test="user != null">
		  	<s:if test="status != null && @com.jysz.certificate.persistence.enums.PerformanceAssignStatus@PM_CONFIRM.equals(status)">
		  		 <jysz:permission code="PM_PAYMENT_CONFIRM">
		 			<a href="javascript:paymentConfirm(<s:property value="id"/>)" title="核发绩效">核发</a>
		 		</jysz:permission>
		 	</s:if>
	 	</s:if>
	 	 <jysz:permission code="PM_PAYMENT_VIEW">
	 		<a href="show.do?entity.id=<s:property value='id'/>" title="查看"><img src="${contextPath}/images/chakan.gif" alt="详情" width="16" height="18" border="0" /></a>
	 	 </jysz:permission>
	  </td>
	</tr>
</s:iterator>		  
		<tr>
		 <td height="36" colspan="10" class="down-center-td-width-bg" align="right">
			<%@ include file="/WEB-INF/view/common/pagination.jsp"%>
 		</td>
		  </tr>
		</table>


		<br/><br/><br/><br/><br/>
		<div><jsp:include page="/include/footer.inc"></jsp:include></div>
	</body>
</html>